<template>
    <div class="property-warp">
        <a-card title="文件属性信息">
            <Detail :data-source="model" :layout="detailLayout" labelWidth="150px"></Detail>
        </a-card>
    </div>
</template>

<script lang='ts' setup>
    import { ref } from 'vue';
    import Detail from '@/components/detail/index.vue';
    defineOptions({
        // 文件属性信息
        name: 'FileProperty'
    });
    const model = defineModel({
        type: Object, // 类型检查
        required: true, // 是否必填
        // 默认值
        default: {}, 
    });
    const detailLayout = ref<any[][]>([
        [{label: '产品范围:', prop:'productRange', labelAlign: 'right' }, {label: '发文部门:', prop:'issuingDepartment', labelAlign: 'right' }],
        [{label: '文件更改记录:', prop:'filesChangeLog', labelAlign: 'right' }, {label: '标准条款:', prop: 'standardTerms', labelAlign: 'right'}],
        [{label: '适用体系:', prop: 'favNameTwo', labelAlign: 'right'}, {label: '适用工厂:', prop: 'applyFactory', labelAlign: 'right'}],
        [{label: '发文范围:', prop: 'receiptRange', labelAlign: 'right', formatter: (data) => data.join('/')}, {label: '发送群组:', prop: 'emailGroup', labelAlign: 'right', formatter: (data) => data.join(';')}],
    ]);
</script>

<style scoped lang="less">
</style>